package com.dragoncombin.homework.Module03.Problem05;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

// 一整副牌的类
public class DeckOfCards {

    // 将枚举PorkerCard中所有扑克牌对象保存到List集合中
    private final List<PokerCard> cards = new ArrayList<>();

    // 无参构造初始化cards
    public DeckOfCards() {
        PokerCard[] cardsArray = PokerCard.values();
        cards.addAll(Arrays.asList(cardsArray));
    }

    // 打印cards含有的扑克牌
    public void printCards() {
        for (PokerCard card : cards) {
            System.out.println(card);
        }
    }

    public List<PokerCard> getCards() {
        return cards;
    }
}
